package org.styx.seata.tcc.order.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.styx.common.response.R;

/**
 * 远程调用－扣减库存
 *
 * @date 2021/8/10
 * @auther uranus
 */
@FeignClient(value = "seata-tcc-storage-service")
public interface StorageService {
    /**
     * 远程调用扣减库存
     *
     * @param productId
     * @param count
     * @return
     */
    @RequestMapping("/storage/decrease")
    public R decrease(@RequestParam("productId") Long productId,
                      @RequestParam("count") Integer count);
}
